public class OddHead {
    public static void main(String[] args) {
        int[] Transform = {1, 2, 3, 4, 5, 6};
        int i = 0;
        int K = 0;
        int tem = 0;
        int flag = 0;
        int n = Transform.length;
        for(K = 1;K < n; K++){
            for (i = 0; i < n - 1; i++) {
                if (Transform[i] % 2 == 0) {
                    tem = Transform[i];
                    Transform[i] = Transform[i + 1];
                    Transform[i + 1] = tem;
                }
            }
        }
        for (i = 0; i < n; i++) {
            System.out.println(Transform[i]);
        }
    }
}
